<%@ page import="com.servlet.JeuDeLaBiere.Model.Main , java.lang.Integer" %>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
<%@ include file="../styles/style.css" %>
</style>
<title>Configuration de la partie - Administrateur</title>
</head>
<body style="background-image: url('/JeuDeLaBiere/img/img2.jpg');">
	<form name="adminForm" action="adminconfig2.do" method="post">
		
		<div id="bloc">		
			<h1>Configuration de la partie - configuration de la demande</h1>
			 
			<%
				out.println("<input type='hidden' name='nomPartie' value='"+request.getAttribute("nomPartie")+"'/>");
				out.println("<input type='hidden' name='nomJoueur' value='Administrateur'/>");
				out.println("<input type='hidden' name='tailleTab' value='"+request.getAttribute("tailleTab")+"'/>");
			%>
			
			<%	if (((Character)request.getAttribute("formeDemande"))=='c') {
				out.println("<p>Valeur de la demande constante :");
				out.println("<select name='demande "+0+"'>");
				for(int j=0; j<26 ; j++) {
					out.println("<option value="+j+">"+j+"</option>");
				}
				out.println("</select>");
					out.println("</p>");
			}
			else if(((Character)request.getAttribute("formeDemande"))=='a') {
				for(int i=0; i<Integer.parseInt(request.getAttribute("tailleTab").toString()); i++) {				
					int tour=i+1;
					out.println("<p>Demande au Tour :"+tour);
					out.println("<select name='demande "+i+"'>");
					for(int j=0; j<26 ; j++) {
						out.println("<option value="+j+">"+j+"</option>");
					}
					out.println("</select>");
   					out.println("</p>");
   				}
			}	
			%>
			<p style="width:50%;margin:auto;"><input type="submit" name="Valider" value="Valider"/></p>
		</div>
	</form>
</body>
</html>